package com.example.demo;

import com.example.demo.service.UserService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class SpringBeanDemoApplication {
    @Bean
    public String s(){
        return "@bean init";
    }


	public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(SpringBeanDemoApplication.class, args);
        UserService userService = run.getBean("userService", UserService.class);

        userService.test();
    }

}
